#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

int n, r, c;
char s[N];
int ans[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> r >> c;
  rep(i, 1, n) cin >> s[i];
  set<pii> st;
  int x = 0, y = 0;
  st.insert(pii(x, y));
  rep(i, 1, n) {
    if (s[i] == 'N')
      x++;
    else if (s[i] == 'S')
      x--;
    else if (s[i] == 'W')
      y++;
    else
      y--;
    st.insert(pii(x, y));
    ans[i] = st.count(pii(x + r, y + c));
  }
  rep(i, 1, n) cout << ans[i];
  return 0;
}